package com.why.whyoj.judge.codesanbox;

import com.why.whyoj.judge.codesanbox.model.ExecuteCodeRequest;
import com.why.whyoj.judge.codesanbox.model.ExecuteCodeResponse;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@AllArgsConstructor
public class CodeSandBoxProxy implements CodeSandBox {
    CodeSandBox codeSandBox;
    @Override
    public ExecuteCodeResponse executeCode(ExecuteCodeRequest executeCodeRequest) {
        log.info("Executing code in CodeSandBox");
        ExecuteCodeResponse response = codeSandBox.executeCode(executeCodeRequest);
        log.info("Code execution completed in CodeSandBox");
        return response;
    }
}
